<input 
    type="hidden" 
    value="{{$item->cate_title}}" 
    id="cate_title_curent" name="cate_title_curent"
    />
<form id="cate_frm" name="cate_frm" action="{{"admincp/excution"|base_url}}" method="POST" 
      onsubmit="return false;" 
      target="integration_asynchronous" autocomplete="off" 
      >
    <div id="tabs">
        <ul class="m-l-20">
            <li>Basic</li>
            <li>Advanced</li>
        </ul>
        <div>
            <div class="grid_12  ">
                

                <!--      title      -->
                <div class="p-r p-b-12">
                    <p>Title (*)</p>
                    <div class="p-r">
                        <input 
                            type="text" onblur="AliasTo('#cate_title','#cate_alias')"
                            class="w-i b-g-c-w validate[required]" 
                            value="{{$item->cate_title|escape:'html'}}" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_title" name="cate_title"
                            />

                        <input 
                            type="hidden" 
                            value="{{$item->cate_id}}" 
                            id="cate_id" name="cate_id"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <!--      alias      -->
                <div class="p-r p-b-12">
                    <p><label class="d-p-b w-i" for="cate_alias">Alias (*)</label></p>
                    <div class="p-r">
                        <input 
                            type="text" 
                            class="w-i b-g-c-w validate[required,custom[alias]]" 
                            value="{{$item->cate_alias|escape:'html'}}" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_alias" name="cate_alias"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <!--      parent      -->
                <div class="p-r p-b-12">
                    <p>Parent</p>
                    <div class="p-r b-g-c-w w-i">
                        {{function catitem level=0}}
                        {{foreach $data as $cat}}
                            {{if isset($item)}}
                                {{if $cat->cate_parent==$level and !$item->cate_id|in_array:$cat->aparents and $item->cate_id!=$cat->cate_id}}
                                    <option {{if $item->cate_parent==$cat->cate_id}}selected="1"{{/if}} 
                                                                                    value="{{$cat->cate_id}}">
                                        {{$cat->pathname}}
                                    </option>
                                    {{catitem data=$data level=$cat->cate_id}}
                                {{else if $cat->cate_parent==$level and ( $item->cate_id|in_array:$cat->aparents or $item->cate_id==$cat->cate_id )}}
                                    <option disabled="disabled" value="{{$cat->cate_id}}">
                                        {{$cat->pathname}}
                                    </option>
                                    {{catitem data=$data level=$cat->cate_id}}
                                {{/if}}
                            {{else}}
                                {{if $cat->cate_parent==$level}}
                                    <option value="{{$cat->cate_id}}">
                                        {{$cat->pathname}}
                                    </option>
                                    {{catitem data=$data level=$cat->cate_id}}
                                {{/if}}
                            {{/if}}
                        {{/foreach}}
                        {{/function}}
                        <select id="cate_parent" class="w-i p-a t-0 l-0" name="cate_parent">
                            <option value="0">Root</option>
                            {{catitem data=$categories level=0}}
                        </select>
                    </div>
                    <p class="erc"></p>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12- f-l">
                    <div class="grid_3">
                        <!--      birth      -->
                        <div class="p-r-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_position">Position</label></p>
                                <input 
                                    type="text" data-putto="#gr-err-1" 
                                    class="w-i b-g-c-w validate[min[-99],max[99]]" 
                                    value="{{$item->cate_position}}" 
                                    minlength="7" min="-99" max="99"
                                    maxlength="20" 
                                    id="cate_position" name="cate_position"
                                    />
                            </div>
                        </div>
                    </div>
                    <div class="grid_3">
                        <!--      birth      -->
                        <div class="p-l-2 p-r-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_status">Status (*)</label></p>
                                <div class="p-r">
                                    <select id="cate_status" name="cate_status" class="w-i">
                                        <option {{if $item->cate_status=='true'}}selected="1"{{/if}} value="true">Public</option>
                                        <option {{if $item->cate_status=='false'}}selected="1"{{/if}} value="false">Private</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="grid_6">
                        <!--      year      -->
                        <div class="p-l-2">
                            <div class="p-r">
                                <p><label class="d-p-b w-i" for="cate_type">Type (*)</label></p>
                                <div class="p-r">
                                    <select id="cate_type" name="cate_type" class="w-i">
                                        {{if $smarty.get.type|default:''=='system'}}
                                            <option selected="1" value="system">System</option>
                                        {{else}}
                                        {{foreach $types as $t}}
                                            <option {{if $item->cate_type|default:$smarty.get.type==$t->cate_value}}selected="1"{{/if}} value="{{$t->cate_value}}">{{$t->cate_title}}</option>
                                        {{/foreach}}
                                        {{/if}}
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <p id="gr-err-1" class="erb"></p>
                </div>
                <div class="clear"></div>
                
            </div>
            <div class="clear"></div>
        </div>
        <div>
            <div class="grid_12">
                <div class="p-r p-b-12">
                    <p>Thumb</p>
                    <div class="p-r">
                        <input 
                            type="text"
                            class="w-i b-g-c-w" 
                            value="{{$item->cate_thumb|escape:'html'}}" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_thumb" name="cate_thumb"
                            />
                        <span class="icon-16 more p-a t-4 r-0 c-s-p" title="Browse Images" onclick="BrowseServer('#cate_thumb')"></span>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12">
                    <p>Link</p>
                    <div class="p-r">
                        <input 
                            type="text"
                            class="w-i b-g-c-w" 
                            value="{{$item->cate_link|escape:'html'}}" 
                            minlength="10"
                            maxlength="120" 
                            id="cate_link" name="cate_link"
                            />
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12">
                    <p>Taget</p>
                    <div class="p-r">
                        <select id="cate_type" name="cate_target" class="w-i">
                            <option {{if $item->cate_target=='normal'}}selected="1"{{/if}} value="normal">Default</option>
                            <option {{if $item->cate_target=='_blank'}}selected="1"{{/if}} value="_blank">Open link in New tab</option>
                        </select>
                    </div>
                </div>
                <div class="clear"></div>
                <div class="p-r p-b-12-">
                    <p>Description</p>
                    <div class="p-r">
                        <textarea id="cate_desc" name="cate_desc" class="w-i">{{$item->cate_desc|escape:'html'}}</textarea>
                    </div>
                </div>
                <div class="clear"></div>
            </div><div class="clear"></div>
        </div>
    </div>
<!--    <div class="p-r p-l-8 p-b-12 t-a-c">
        <div id="step-3-next" onclick="cate_save()" class="b-t-c g-d-w">Save</div>
        <div id="step-3-back" onclick="CloseDialogMessage($('#reg-box-step-3'))" class="b-t-c g-d-w m-r-8">Cancel</div>
        <div class="clear"></div>
    </div>

    <div class="clear"></div>-->
</form>